package com.summer.main;

import java.lang.reflect.Field;

public class EnumTest {

	public enum EnumT{
		 LOW, MEDIUM, HIGH, URGENT;
	}
	
	public static void main(String[] args) {
		EnumT kay = EnumT.HIGH;
		try {
			Field field= Enum.class.getDeclaredField("ordinal");
			//Field field= Enum.class.getDeclaredField("name");
			field.setAccessible(true);
			field.setInt(kay, 0);
			//field.set(kay, "LOW");
			
		} catch (NoSuchFieldException | SecurityException | IllegalAccessException | IllegalArgumentException e) {
			e.printStackTrace();
		}
		
		switch (kay) {
		case LOW:
			System.out.println("LOW");
			break;

		default:
			break;
		}
	}
	
}
